package com.lei.library_mvp_retrofit.mvp.presenter;

import com.lei.library_mvp_retrofit.mvp.model.IModel;
import com.lei.library_mvp_retrofit.mvp.view.IView;

/**
 * @ProjectName : YoHoJava_002
 * @Author : 雷金泷
 * @Time : 2021/1/8 16:01
 * @Description : 文件描述
 */
public class BasePresenter<M extends IModel,V extends IView> implements IPresenter {
    protected M mModel;
    protected V mView;

    public BasePresenter(M mModel, V mView) {
        this.mModel = mModel;
        this.mView = mView;
    }

    @Override
    public void destroy() {
        if (mModel!=null){
            mModel.destroy();
            mModel = null;
        }
        if (mView!=null){
            mView = null;
        }
    }
}
